package com.springboot.cloud.authorization.service.impl;

import com.springboot.cloud.authorization.entity.Role;
import com.springboot.cloud.authorization.provider.SystemProvider;
import com.springboot.cloud.authorization.service.RoleService;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * <p>  </p>
 *
 * @author Bertram
 * @since 11/4/2019 4:54 PM
 */
@Service
public class RoleServiceImpl implements RoleService {
    private SystemProvider systemProvider;

    public RoleServiceImpl(SystemProvider systemProvider) {
        this.systemProvider = systemProvider;
    }
    @Override
    public Set<Role> queryUserRolesByUserId(String userId) {
        return systemProvider.queryRolesByUserId(userId).getData();
    }
}
